﻿#ifndef MOVEDATA_H
#define MOVEDATA_H

#include <QUndoCommand>
#include "JistCommonModel.h"
#include "JistTableView.h"
class JistDocument;

/**
 * A command that moves a map layer up or down in the layer stack.
 */
class MoveData : public QUndoCommand
{
public:
    enum Direction { Up, Down };

    MoveData(JistDocument *document, int index, Direction direction, JistTableView *tableView);

    void undo();
    void redo();
    void moveListData(Direction dir);

private:
    JistDocument *m_pDocument;
    int m_Index;
    Direction m_Direction;
    JistTableView *m_pTableView;
    QModelIndexList m_ModelIndexList;
};

#endif // MOVEDATA_H


